/*
 * @Descripttion: 
 * @version: 
 * @Author: cyj
 * @Date: 2022-12-05 23:57:00
 */
//引入二次封装的axios
import request from "../../utils/request";

//获取热搜列表的数据
export const getHotList = () => request({
    url: '/search/hot/detail',
    method: 'GET'
})

//获取搜索内容
//默认为 1 即单曲 , 取值意义 : 1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频, 1018:综合, 2000:声音
export const getSearchDetail = (keywords, type, offset, limit = 30) => request({
    url: '/cloudsearch',
    params: {
        keywords, type, offset, limit
    }
})

//搜索多重匹配
export const getGoodMatch = (keywords) => request({
    url: '/search/multimatch',
    params: { keywords }
})

//搜索单曲
export const getSearchSong = (keywords, offset, type = 1, limit = 50) => request({
    url: '/cloudsearch',
    params: {
        keywords, type, offset, limit
    }
})

//搜索专辑
export const getSearchAlbum = (keywords, offset, type = 10, limit = 30) => request({
    url: '/cloudsearch',
    params: {
        keywords, type, offset, limit
    }
})

//搜索歌手
export const getSearchSinger = (keywords, offset, type = 100, limit = 30) => request({
    url: '/cloudsearch',
    params: {
        keywords, type, offset, limit
    }
})

//搜索歌单
export const getSearchSongList = (keywords, offset, type = 1000, limit = 30) => request({
    url: '/cloudsearch',
    params: {
        keywords, type, offset, limit
    }
})

//搜索MV
export const getSearchMV = (keywords, offset, type = 1004, limit = 40) => request({
    url: '/cloudsearch',
    params: {
        keywords, type, offset, limit
    }
})

//搜索视频
export const getSearchVideo = (keywords, offset, type = 1014, limit = 40) => request({
    url: '/cloudsearch',
    params: {
        keywords, type, offset, limit
    }
})

//搜索用户
export const getSearchUser = (keywords, offset, type = 1002, limit = 40) => request({
    url: '/cloudsearch',
    params: {
        keywords, type, offset, limit
    }
})